package com.bw.skill;

import android.os.Handler;

/**
 * @author KK
 * @description:
 * @date :2021/10/25 15:56
 * 1635335116
 * 1635335128
 */
public class TimeThread extends Thread{

    private Handler handler;
    public TimeThread(Handler handler){
        this.handler = handler;
    }
    @Override
    public void run() {
        super.run();
        while (!isInterrupted()){
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            handler.sendEmptyMessage(0);
        }
    }
}
